package com.aispeech.task.lasr.fsm;

import com.aispeech.task.lasr.event.EventType;
import com.aispeech.task.mgr.fsm.State;
import com.aispeech.task.mgr.fsm.Transition;

public class LASRState extends State {
	public static final LASRState Finish = new LASRState("Finish", new Transition(EventType.Finish, Terminal));
	public static final LASRState CheckError = new LASRState("CheckError", new Transition(EventType.Labeled, Retry));
	public static final LASRState Label = new LASRState("Label", new Transition(EventType.Labeled, Finish), new Transition(EventType.Error, CheckError));
	public static final LASRState Fuse = new LASRState("Fuse", new Transition(EventType.Fused, Label), new Transition(EventType.Error, CheckError));
	public static final LASRState Asr = new LASRState("Asr", new Transition(EventType.Asred, Fuse), new Transition(EventType.Error, CheckError));
	public static final LASRState AudioCut = new LASRState("AudioCut", new Transition(EventType.AudioCutted, Asr), new Transition(EventType.Error, CheckError));
	public static final LASRState SplitChannel = new LASRState("SplitChannel", new Transition(EventType.ChannelSplitted, AudioCut), new Transition(EventType.Error, CheckError));
	public static final LASRState Download = new LASRState("Download", new Transition(EventType.Downloaded, SplitChannel), new Transition(EventType.Error, CheckError));
	public static final LASRState Initial = new LASRState("Download", new Transition(EventType.Downloading, Download));
	protected LASRState(String name, Transition... transitions) {
		super(name, transitions);
	}
}
